package com.itany.corejava.day09;

public class Test1 {

    public static void main(String[] args) {


        int seasonA=SeasonA.SUMMER;

        System.out.println(f(seasonA));

        System.out.println(f(-443));


        SeasonB seasonB=SeasonB.SUMMER;

        System.out.println(f(seasonB));

        SeasonC seasonC=SeasonC.SUMMER;

        System.out.println(seasonC);

        System.out.println(f(seasonC));


    }

    public static String f(int season){
        switch (season) {
            case SeasonA.SPRING :
                return "春天";
            case SeasonA.SUMMER :
                return "夏天";
            case SeasonA.AUTUMN :
                return "秋天";
            case SeasonA.WINTER :
                return "冬天";
        }
        return null;
    }

    public static String f(SeasonB season){
        switch (season.getValue()) {
            case 1 :
                return "春天";
            case 2 :
                return "夏天";
            case 3 :
                return "秋天";
            case 4 :
                return "冬天";
        }
        return null;
    }

    public static String f(SeasonC season){
        switch (season) {
            case SPRING :
                return "春天";
            case SUMMER :
                return "夏天";
            case AUTUMN :
                return "秋天";
            case WINTER :
                return "冬天";
        }
        return null;
    }
}
